<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
  <head> 
    <title>
      Prompt JavaScript
    </title>
    <!-- Load the supporting libraries -->
    <script type="text/javascript" 
	    src="renderengine/libs/sylvester.js"></script>
    <script type="text/javascript" src="ode45.js"></script>
    <script type="text/javascript" 
	    src="http://media.liquidx.net/js/mochi/MochiKit.js"></script> 
    <script type="text/javascript" src="PlotKit/excanvas.js"></script> 
    <script type="text/javascript" src="PlotKit/PlotKit_Packed.js"></script> 
  </head> 
  <body> 
    <script language="Javascript" type=text/javascript>
      <!--
    	 function f(t,x,u){
    	     // x is a sylvester.js vector
    	     // Needs to return a sylvester.js vector of the same size as x
    	     return $V([x.e(2), -2*x.e(1) - 0.5*x.e(2) + u])
    	 }
    	 var t0 = 0
    	 var x0 = $V([0,0])
    	 var u = 1
    	 var len = 10
    	 var eps = 0.000001
    	 var dat = ode45_all(f,x0,u,t0,len,eps)
    	 function demo() {
     	 var hasCanvas = CanvasRenderer.isSupported();
    	 var data1 = [[0, 5], [1, 4], [2, 3], [3, 5], [4, 6], [5, 7]];
    	 //var data2 = [[0, 2.5], [1, 2], [2, 1.5], [3, 2.5], [4, 3], [5,3.5]];
	 
    	 if (hasCanvas) {
    	 opts = {}
    	 var line = new EasyPlot("line", opts, $('canvasline'), [dat]);
    	 }
    	 }
    	 addLoadEvent(demo);
      -->
    </script>
    <div class="demo" id="canvasline" width="600" height="200"></div> 
  </body> 
</html>
